<?php
class Shop_Form_AttrSet_AddProduct extends Promotor_Form_Scaffold {

	public function init() {
		$this->setMethod('post');
		$this->setAttrib('enctype', Zend_Form::ENCTYPE_MULTIPART);

		$this->addPrefixPath('Promotor_Form_Decorator_','Promotor/Form/Decorator', self::DECORATOR);

		$subForm = $this->_getContentForm();
        $this->addSubForm($subForm, 'contenttab');
	}
	
	/**
     * @return Zend_Dojo_Form_SubForm
     */
    protected function _getContentForm() {
    	$subForm = new Zend_Form_SubForm();
        $subForm->setAttribs(array(
            'name'   => 'contenttab',
            'legend' => 'Wybierz rodzaj produktu',
        ));
        $subForm
        	->addElement(new KontorX_Form_Element_Db_Select('attr_set_id', array(
            	'label' => 'Rodzja produktu',
            	'required' => false,
        		'firstNull' => true,
            	'tableName' => 'shop_product_attr_set',
            	'tableCols' => array('key' => 'id','value' => 'name')
            )));
            
        return $subForm;
    }
}